<html>
<head>
<title>Search 產品</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link media="all" href="/cms/css/cms.min.css" type="text/css" rel="stylesheet" /> 
<link rel="stylesheet" type="text/css" href="/cms/css/tag/token-input.css" />
<script  type="text/javascript" src="/cms/js/cms.1.1.min.js"></script>
<script type="text/javascript" src="/cms/js/tag/jquery.tokeninput.js"></script>
</head>

<body>
{#include file="$navigation"#}
<div style="float:right;" id="login"></div>

	<style type="text/css">
	#sortable { list-style-type: none; margin: 0; padding: 0; width: 100%; }
	#sortable li { margin: 0 3px 3px 3px; padding: 0.4em; 
	  padding-left: 1.5em; font-size: 1.4em; height: 18px; }
	#sortable li span { position: absolute; margin-left: -1.3em; }
	</style>
	<script type="text/javascript">
	$(function() {
		$("#sortable").sortable();
		$("#sortable").disableSelection();
	});
	</script>

<H1><span id="parent_key_label"></span>Search 產品</H1>
<form name="form" method="post" action="{#$self_url#}" >	
<div class='tableWrapper' style="width:100%;margin:0;padding:0;">
  <div class='tableHeader' >

	<ul class="tableActions">
	<li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" type="submit" name="Submit" value="確定"></li><li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="Submit" value=" 清除 " onclick="form.reset();" type="button"></li><li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="dummy" value=" 取消 " size="3" onclick="javascript:window.location.href='{#$self_url#}/list'" type="button"></li>
	</ul>

  <div class='clear'></div>
  <div class='corner left'></div>
  <div class='corner right'></div>
  </div>	
<table border="0" cellspacing='0' >
  <tr>
    <td>

<ul id="sortable">
<li class="ui-state-default" style="height: auto !important;"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span><div style="width:200px;float:left;"><input type="hidden" name="searchable_fields[]" value="global_search"><a onclick="search_toggle_disable('global_search')">General Search</a></div>

	<div style="float:left;">
<input type="hidden" name="global_search__OPTION" value="global_search" id="search_global_search__OPTION">
</div>
<div style="float:left;">
<input type="text" name="global_search" value="" id="search_global_search"></div>
<div style="width:80px;float:left;">
<select name="cname__COND" id="search_cname__COND">
<option value="and">and</option>
<option value="or">or</option>
<option value="and (">and (</option>
<option value="or (">or (</option>
<option value=") and">) and</option>
<option value=")">)</option>
</select></div>

<div style="clear:both;"></div></li>
<li class="ui-state-default" style="height: auto !important;"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span><div style="width:200px;float:left;"><input type="hidden" name="searchable_fields[]" value="id"><a onclick="search_toggle_disable('id')"><B>id</B></a></div>

<div style="float:left;">
{#$showsearch_data.id__OPTION#}
{#$showsearch_data.id__MATCH#}</div>
<div style="float:left;">
{#$showsearch_data.id#}</div>
<div style="width:80px;float:left;">
{#$showsearch_data.id__COND#}</div>
<div style="clear:both;"></div></li>
<li class="ui-state-default" style="height: auto !important;"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span><div style="width:200px;float:left;"><input type="hidden" name="searchable_fields[]" value="brand"><a onclick="search_toggle_disable('brand')"><B>品牌</B></a></div>

<div style="max-width:70%;float:left;font-size:13px;">
{#$showsearch_data.brand__OPTION#}
<input type="hidden" name="brand__MATCH" id="search_brand__MATCH" value="multiple">
{#$showsearch_data.brand#}</div>
<div style="width:80px;float:left;">
{#$showsearch_data.brand__COND#}</div>
<div style="clear:both;"></div></li>
<li class="ui-state-default" style="height: auto !important;"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span><div style="width:200px;float:left;"><input type="hidden" name="searchable_fields[]" value="is_trial"><a onclick="search_toggle_disable('is_trial')"><B>試用</B></a></div>

<div style="width:150px;float:left;">
{#$showsearch_data.is_trial__OPTION#}
<input type="hidden" name="is_trial__MATCH" id="search_is_trial__MATCH" value="multiple"></div>
<div style="width:200px;float:left;">
{#$showsearch_data.is_trial#}</div>
<div style="width:80px;float:left;">
{#$showsearch_data.is_trial__COND#}</div>
<div style="clear:both;"></div></li>
<li class="ui-state-default" style="height: auto !important;"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span><div style="width:200px;float:left;"><input type="hidden" name="searchable_fields[]" value="member_type"><a onclick="search_toggle_disable('member_type')"><B>試用會員分類</B></a></div>

<div style="max-width:70%;float:left;font-size:13px;">
{#$showsearch_data.member_type__OPTION#}
<input type="hidden" name="member_type__MATCH" id="search_member_type__MATCH" value="multiple">
{#$showsearch_data.member_type#}</div>
<div style="width:80px;float:left;">
{#$showsearch_data.member_type__COND#}</div>
<div style="clear:both;"></div></li>
</ul>
   </td> 
  </tr>
  <tr>
    <td>
     	<!--debug-->
    <input type="hidden" name="action" value="search">
    <input type="hidden" name="subaction" value="">
    <ul class="tableActions">
    <li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" type="submit" name="Submit" value="確定"></li><li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="Submit" value=" 清除 " onclick="form.reset();" type="button"></li><li><input class="psbutton" onmouseover="this.className='psbuttonhover'" onmouseout="this.className='psbutton'" name="dummy" value=" 取消 " size="3" onclick="javascript:window.location.href='{#$self_url#}/list'" type="button"></li>
  </ul>
    </td> 
  </tr>
</table>
</form>

<script>
function search_toggle_disable(field_name){
  if ($('#search_'+field_name).attr("disabled") == true) { 
	  $('#search_'+field_name).removeAttr("disabled"); 
	  $('#search_'+field_name+'__COND').removeAttr("disabled"); 
	  $('#search_'+field_name+'__MATCH').removeAttr("disabled"); 
	} else {  
		$('#search_'+field_name).attr("disabled", true); 
		$('#search_'+field_name+'__COND').attr("disabled", true); 
		$('#search_'+field_name+'__MATCH').attr("disabled", true); 
  }
} 
</script>

<script>
$(function(){
    $(".tips").tipTip({defaultPosition: "right", edgeOffset: 10});
}); 
</script>
</body>
</html>
